Skip to content

Commit

Permalink
Update dependencies (#9968)
Browse files Browse the repository at this point in the history
  • Loading branch information
devongovett authored Sep 30, 2024
1 parent 684b164 commit 6f68c78
Show file tree
Hide file tree
Showing 56 changed files with 4,328 additions and 4,180 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,11 @@ jobs:
packages/core/rust/*.node
integration_tests:
name: Integration tests (${{ matrix.version == 'v3' && 'v3, ' || '' }}${{ matrix.os }}, Node ${{ matrix.node }})
name: Integration tests (${{ matrix.os }}, Node ${{ matrix.node }})
strategy:
matrix:
node: [18, 20]
os: [ubuntu-latest, macos-latest, windows-latest]
version: [v2, v3]
# These tend to be quite flakey, so one failed instance shouldn't stop
# others from potentially succeeding
fail-fast: false
Expand All @@ -124,8 +123,6 @@ jobs:
- run: yarn build-native-release
- run: yarn build
- run: yarn test:integration-ci
env:
PARCEL_V3: ${{ matrix.version == 'v3' && 'true' || 'false' }}

# Deployment steps taken from https://github.com/colinwilson/static-site-to-vercel/blob/master/.github/workflows/deploy-preview.yml
repl_build:
Expand Down
6 changes: 5 additions & 1 deletion flow-libs/dotenv-expand.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ declare module 'dotenv-expand' {
declare type DotenvConfig = {
error?: Error,
parsed?: { [string]: string, ... },
processEnv?: {...},
...
};

// See: https://github.com/motdotla/dotenv-expand/blob/ddb73d02322fe8522b4e05b73e1c1ad24ea7c14a/lib/main.js
declare module.exports: (config: DotenvConfig) => DotenvConfig;
declare module.exports: {
expand: (config: DotenvConfig) => void,
...
};
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"buffer": "mischnic/buffer#b8a4fa94",
"cross-env": "^7.0.0",
"eslint": "^8.41.0",
"fast-glob": "^3.2.12",
"flow-bin": "0.184.0",
"glob": "^7.1.6",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"husky": "^6.0.0",
Expand All @@ -60,7 +60,7 @@
"mocha-junit-reporter": "^2.0.0",
"mocha-multi-reporters": "^1.5.1",
"prettier": "2.4.1",
"punycode": "^1.4.1",
"punycode": "^2.3.1",
"rimraf": "^5.0.5",
"semver": "^7.5.2",
"sinon": "^7.3.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/codeframe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}
},
"dependencies": {
"chalk": "^4.1.0"
"chalk": "^4.1.2"
},
"devDependencies": {
"emphasize": "^4.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"base-x": "^3.0.8",
"browserslist": "^4.6.6",
"clone": "^2.1.1",
"dotenv": "^7.0.0",
"dotenv-expand": "^5.1.0",
"dotenv": "^16.4.5",
"dotenv-expand": "^11.0.6",
"json5": "^2.2.0",
"msgpackr": "^1.9.9",
"nullthrows": "^1.1.1",
Expand Down
11 changes: 5 additions & 6 deletions packages/core/core/src/loadDotEnv.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type {FileSystem} from '@parcel/fs';
import type {EnvMap, FilePath} from '@parcel/types';

import {resolveConfig} from '@parcel/utils';
// $FlowFixMe
import dotenv from 'dotenv';
import variableExpansion from 'dotenv-expand';

Expand Down Expand Up @@ -39,16 +40,14 @@ export default async function loadEnv(

// `ignoreProcessEnv` prevents dotenv-expand from writing values into `process.env`:
// https://github.com/motdotla/dotenv-expand/blob/ddb73d02322fe8522b4e05b73e1c1ad24ea7c14a/lib/main.js#L5
let output = variableExpansion({
let output = {};
variableExpansion.expand({
processEnv: output,
parsed: dotenv.parse(await fs.readFile(envPath)),
ignoreProcessEnv: true,
});

if (output.error != null) {
throw output.error;
}

return output.parsed;
return output;
}),
);

Expand Down
18 changes: 7 additions & 11 deletions packages/core/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,42 +19,38 @@
"@babel/plugin-syntax-module-attributes": "^7.10.4",
"@babel/preset-env": "^7.22.14",
"@babel/preset-typescript": "^7.22.11",
"@jetbrains/kotlinc-js-api": "^1.2.12",
"@mdx-js/react": "^1.5.3",
"@types/react": "^17",
"autoprefixer": "^10.4.0",
"chalk": "^4.1.0",
"chalk": "^4.1.2",
"command-exists": "^1.2.6",
"core-js": "^3.2.1",
"cross-env": "^7.0.0",
"elm": "^0.19.1-5",
"elm-hot": "^1.1.5",
"esbuild-register": "^3.5.0",
"exif-reader": "^1.0.3",
"exif-reader": "^2.0.1",
"get-port": "^5.0.0",
"graphql": "^15.0.0",
"http-proxy-middleware": "^2.0.1",
"js-yaml": "^4.0.0",
"jsdom": "^19.0.0",
"jsdom": "^25.0.1",
"json5": "^2.2.0",
"kotlin": "^1.3.11",
"lodash": "^4.17.15",
"ncp": "^2.0.0",
"nib": "^1.1.2",
"node-elm-compiler": "^5.0.5",
"parcel": "2.12.0",
"postcss": "^8.4.5",
"postcss-custom-properties": "^12.1.2",
"postcss-import": "^14.0.2",
"posthtml-include": "^1.7.2",
"postcss-import": "^16.1.0",
"posthtml-include": "^2.0.1",
"posthtml-obfuscate": "^0.1.5",
"preact": "^10.5.9",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"sugarss": "^3.0.3",
"sugarss": "^4.0.1",
"tailwindcss": "^3.0.2",
"tempy": "^0.3.0",
"wasm-sourcemap": "^1.0.0",
"ws": "^7.0.0"
"ws": "^8.18.0"
}
}
4 changes: 3 additions & 1 deletion packages/core/integration-tests/test/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,9 @@ describe('css', () => {
path.join(__dirname, '/integration/css-nesting/a.css'),
{
defaultTargetOptions: {
engines: {},
engines: {
browsers: 'chrome 80',
},
},
},
);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/integration-tests/test/hmr.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ describe('hmr', function () {

assert.equal(message.type, 'update');

assert.equal(message.assets.length, 2);
assert.equal(message.assets.length, 1);
});

it('should emit an HMR error on bundle failure', async function () {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/integration-tests/test/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ describe('image', function () {
const buffer = await outputFS.readFile(imagePath);
const image = await sharp(buffer).metadata();

const {exif} = exifReader(image.exif);
const exif = exifReader(image.exif);

assert.strictEqual(
exif.UserComment.toString(),
exif.Photo.UserComment.toString(),
'ASCII\u0000\u0000\u0000This is a comment',
);
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
module.exports = (opts = {}) => {
const glob = require('glob');
const glob = require('fast-glob');
const fs = require('fs');
const path = require('path')

return {
postcssPlugin: 'postcss-test',
Once(root, {result}) {
root.walkRules((rule) => {
rule.each((decl) => {
if (decl.value === 'bg-glob') {
decl.value = glob.sync(__dirname + '/backgrounds/*.txt').sort().map(f => fs.readFileSync(f)).join(', ');
decl.value = glob.sync('backgrounds/*.txt', {cwd: __dirname}).sort().map(f => fs.readFileSync(path.join(__dirname, f))).join(', ');
result.messages.push({
type: 'dir-dependency',
dir: __dirname + '/backgrounds',
Expand Down
3 changes: 2 additions & 1 deletion packages/core/integration-tests/test/parcel-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ describe('@parcel/link', () => {

it('prints help text', async () => {
let cli = createProgram({fs: overlayFS});
await assert.throws(() => cli('--help'), /\(outputHelp\)/);
// $FlowFixMe[prop-missing]
await assert.rejects(() => cli('--help'), /\(outputHelp\)/);
});

it('links by default', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/integration-tests/test/xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ describe('xml', function () {
contents.includes(
`<img src="http://example.org/${path.basename(
b.getBundles().find(b => b.type === 'png').filePath,
)}">`,
)}">`,
),
);
assert(contents.includes(`<link>http://example.org/post.html</link>`));
Expand Down
2 changes: 1 addition & 1 deletion packages/core/markdown-ansi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"node": ">= 16.0.0"
},
"dependencies": {
"chalk": "^4.1.0"
"chalk": "^4.1.2"
}
}
4 changes: 2 additions & 2 deletions packages/core/package-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
},
"devDependencies": {
"command-exists": "^1.2.6",
"cross-spawn": "^6.0.4",
"cross-spawn": "^7.0.3",
"nullthrows": "^1.1.1",
"split2": "^3.1.1"
"split2": "^4.2.0"
},
"peerDependencies": {
"@parcel/core": "^2.12.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/core/parcel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"@parcel/reporter-dev-server": "2.12.0",
"@parcel/reporter-tracer": "2.12.0",
"@parcel/utils": "2.12.0",
"chalk": "^4.1.0",
"commander": "^7.0.0",
"chalk": "^4.1.2",
"commander": "^12.1.0",
"get-port": "^4.2.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/profiler/src/SamplingProfiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default class SamplingProfiler {

sendCommand(
method: string,
params?: mixed,
params?: {...},
): Promise<{profile: Profile, ...}> {
invariant(this.session != null);
return new Promise((resolve, reject) => {
Expand Down
2 changes: 0 additions & 2 deletions packages/core/rust/browser.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* global WebAssembly, crypto */

const {Environment, napi} = require('napi-wasm');

let env;
Expand Down
6 changes: 3 additions & 3 deletions packages/core/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
"@parcel/fs": "2.12.0",
"@parcel/package-manager": "2.12.0",
"@parcel/utils": "2.12.0",
"chalk": "^4.1.0",
"chalk": "^4.1.2",
"ncp": "^2.0.0",
"nullthrows": "^1.1.1",
"posthtml": "^0.16.5",
"posthtml-parser": "^0.10.1",
"posthtml-parser": "^0.12.1",
"resolve": "^1.12.0",
"ws": "^7.0.0"
"ws": "^8.18.0"
}
}
5 changes: 2 additions & 3 deletions packages/core/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@parcel/markdown-ansi": "2.12.0",
"@parcel/rust": "2.12.0",
"@parcel/source-map": "^2.1.1",
"chalk": "^4.1.0",
"chalk": "^4.1.2",
"nullthrows": "^1.1.1"
},
"devDependencies": {
Expand All @@ -51,12 +51,11 @@
"is-glob": "^4.0.0",
"is-url": "^1.2.2",
"json5": "^2.2.0",
"lru-cache": "^6.0.0",
"lru-cache": "^10.0.0",
"micromatch": "^4.0.4",
"node-forge": "^1.2.1",
"nullthrows": "^1.1.1",
"open": "^7.0.3",
"random-int": "^1.0.0",
"snarkdown": "^2.0.0",
"strip-ansi": "^6.0.0",
"terminal-link": "^2.1.1"
Expand Down
6 changes: 3 additions & 3 deletions packages/core/utils/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import path from 'path';
import clone from 'clone';
import json5 from 'json5';
import {parse as toml} from '@iarna/toml';
import LRU from 'lru-cache';
import {LRUCache} from 'lru-cache';

export type ConfigOutput = {|
config: ConfigResult,
Expand All @@ -19,7 +19,7 @@ export type ConfigOptions = {|
parser?: string => any,
|};

const configCache = new LRU<FilePath, ConfigOutput>({max: 500});
const configCache = new LRUCache<FilePath, ConfigOutput>({max: 500});
const resolveCache = new Map();

export function resolveConfig(
Expand Down Expand Up @@ -96,7 +96,7 @@ export async function loadConfig(
}

loadConfig.clear = () => {
configCache.reset();
configCache.clear();
resolveCache.clear();
};

Expand Down
3 changes: 1 addition & 2 deletions packages/core/utils/test/PromiseQueue.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// @flow
import assert from 'assert';
import randomInt from 'random-int';

import PromiseQueue from '../src/PromiseQueue';
import sinon from 'sinon';
Expand Down Expand Up @@ -66,7 +65,7 @@ describe('PromiseQueue', () => {
running++;
assert(queue._numRunning === running);
assert(running <= maxConcurrent);
await Promise.resolve(randomInt(1, 10)); //sleep(randomInt(1, 10));
await Promise.resolve(Math.floor(Math.random() * 10) + 1);
running--;
}),
);
Expand Down
2 changes: 1 addition & 1 deletion packages/dev/bundle-stats-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@parcel/query": "2.12.0",
"@parcel/reporter-bundle-stats": "2.12.0",
"@parcel/utils": "2.12.0",
"commander": "^7.0.0"
"commander": "^12.1.0"
},
"devDependencies": {
"@parcel/babel-register": "2.12.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/dev/parcel-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@parcel/babel-register": "2.12.0",
"@parcel/fs": "2.12.0",
"@parcel/utils": "2.12.0",
"commander": "^7.0.0",
"commander": "^12.1.0",
"nullthrows": "^1.1.1"
}
}
4 changes: 2 additions & 2 deletions packages/dev/repl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@parcel/fs": "2.12.0",
"@parcel/package-manager": "2.12.0",
"comlink": "^4.3.1",
"filesize": "^6.3.0",
"filesize": "^10.1.6",
"idb": "^5.0.8",
"isomorphic-fetch": "^3.0.0",
"jszip": "^3.7.1",
Expand All @@ -45,6 +45,6 @@
"browserslist": "Chrome 75",
"devDependencies": {
"eslint-config-react-app": "^7.0.1",
"sharp": "^0.31.1"
"sharp": "^0.33.5"
}
}
2 changes: 1 addition & 1 deletion packages/dev/repl/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
} from './components/';
import {saveState, reducer, getInitialState} from './components';
import type {State} from './components';
import filesize from 'filesize';
import {filesize} from 'filesize';
import {linkSourceMapVisualization} from './utils';
import nullthrows from 'nullthrows';

Expand Down
Loading

0 comments on commit 6f68c78

Please sign in to comment.